/*
 * Copyright (c) 2017-2019 THL A29 Limited, a Tencent company. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *    http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <tencentcloud/ocr/v20181119/model/VatInvoiceVerifyRequest.h>
#include <tencentcloud/core/utils/rapidjson/document.h>
#include <tencentcloud/core/utils/rapidjson/writer.h>
#include <tencentcloud/core/utils/rapidjson/stringbuffer.h>

using namespace TencentCloud::Ocr::V20181119::Model;
using namespace rapidjson;
using namespace std;

VatInvoiceVerifyRequest::VatInvoiceVerifyRequest() :
    m_invoiceCodeHasBeenSet(false),
    m_invoiceNoHasBeenSet(false),
    m_invoiceDateHasBeenSet(false),
    m_additionalHasBeenSet(false)
{
}

string VatInvoiceVerifyRequest::ToJsonString() const
{
    Document d;
    d.SetObject();
    Document::AllocatorType& allocator = d.GetAllocator();


    if (m_invoiceCodeHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "InvoiceCode";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, Value(m_invoiceCode.c_str(), allocator).Move(), allocator);
    }

    if (m_invoiceNoHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "InvoiceNo";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, Value(m_invoiceNo.c_str(), allocator).Move(), allocator);
    }

    if (m_invoiceDateHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "InvoiceDate";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, Value(m_invoiceDate.c_str(), allocator).Move(), allocator);
    }

    if (m_additionalHasBeenSet)
    {
        Value iKey(kStringType);
        string key = "Additional";
        iKey.SetString(key.c_str(), allocator);
        d.AddMember(iKey, Value(m_additional.c_str(), allocator).Move(), allocator);
    }


    StringBuffer buffer;
    Writer<StringBuffer> writer(buffer);
    d.Accept(writer);
    return buffer.GetString();
}


string VatInvoiceVerifyRequest::GetInvoiceCode() const
{
    return m_invoiceCode;
}

void VatInvoiceVerifyRequest::SetInvoiceCode(const string& _invoiceCode)
{
    m_invoiceCode = _invoiceCode;
    m_invoiceCodeHasBeenSet = true;
}

bool VatInvoiceVerifyRequest::InvoiceCodeHasBeenSet() const
{
    return m_invoiceCodeHasBeenSet;
}

string VatInvoiceVerifyRequest::GetInvoiceNo() const
{
    return m_invoiceNo;
}

void VatInvoiceVerifyRequest::SetInvoiceNo(const string& _invoiceNo)
{
    m_invoiceNo = _invoiceNo;
    m_invoiceNoHasBeenSet = true;
}

bool VatInvoiceVerifyRequest::InvoiceNoHasBeenSet() const
{
    return m_invoiceNoHasBeenSet;
}

string VatInvoiceVerifyRequest::GetInvoiceDate() const
{
    return m_invoiceDate;
}

void VatInvoiceVerifyRequest::SetInvoiceDate(const string& _invoiceDate)
{
    m_invoiceDate = _invoiceDate;
    m_invoiceDateHasBeenSet = true;
}

bool VatInvoiceVerifyRequest::InvoiceDateHasBeenSet() const
{
    return m_invoiceDateHasBeenSet;
}

string VatInvoiceVerifyRequest::GetAdditional() const
{
    return m_additional;
}

void VatInvoiceVerifyRequest::SetAdditional(const string& _additional)
{
    m_additional = _additional;
    m_additionalHasBeenSet = true;
}

bool VatInvoiceVerifyRequest::AdditionalHasBeenSet() const
{
    return m_additionalHasBeenSet;
}


